<template>
    <div class="pageContainer">
        
        <div class="treeTable">
            <div style="flex:1;">
                <CPageTable :data="tableData" :curPage="paging.curPage" :total="paging.total" @changeSize="changeSize" @changePage="search">
                    <template slot-scope="scope">
                        <CBtn type="text" @click="showEdit(scope.row)">修改</CBtn>
                    </template>
                </CPageTable>
            </div>
        </div>
        <CDailog title="新增/编辑" :isShow="isShowEdit" @close="isShowEdit = false" @enter="doSave">
            <el-form :inline="true">
                <CText form readonly v-model="mm.code" title="编码" field="code"></CText>
                <CText form readonly v-model="mm.name" title="名称" field="name"></CText>
                <CText form v-model="mm.val" title="折扣" field="val"></CText>
            </el-form>
        </CDailog>
    </div>
</template>

<script>
import pagingMixin from '@/mixin/pagingMixin'
export default {
    mixins: [pagingMixin],
    data() {
        return {
            model: "sys",
            table: "SysDef",
            defaultMM:{
                fkDefTypeId: "10"
            }
        }
    },
    created() {
        this.templateId = "d6eceebe-6f93-4c69-a8dc-53c7626d1ffd";
        
        //取得查询条件
        this.$sys.getPageConditions({id: this.templateId}).then(res => {
            this.listCondition = res.data;
        })
        //查询表格数据
        this.search(1);
    },
    methods: {
        
    }
}
</script>

<style lang="scss" scoped></style>